package com.network.service.impl;

import com.network.mapper.PhoneMapper;
import com.network.pojo.Phone;
import com.network.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PhoneServiceImpl implements PhoneService {

    @Autowired
    PhoneMapper phoneMapper;

    @Override
    public List<Phone> selectPhoneNumberByUId(int uid) {
        return phoneMapper.findPhoneNumberByUid(uid);
    }

    @Override
    public void insertPhoneNumber(int uid, List<Phone> phones) {
        phoneMapper.insert(phones,uid);
    }

    @Override
    public void delete(int uid) {
        phoneMapper.deletePhoneNumberByUid(uid);
    }
}
